home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Online / Epic4 / share / epic / help / 6_functions / trunc < prev    next >
Text File  |  2001-03-21  |  566b  |  23 lines

  1. Synopsis:
  2.    $trunc(<precision> <float>)
  3.  
  4. Technical:
  5.    This function truncates the given decimal number to the given precision,
  6.    rounding up or down as appropriate.
  7.  
  8. Practical:
  9.    This function is useful for rounding floating-point numbers.  It may be
  10.    used any time, though it is usually most useful when FLOATING_POINT_MATH
  11.    is turned on.
  12.  
  13. Returns:
  14.    truncated number
  15.  
  16. Examples:
  17.    $trunc(2 3.141592654)                 returns "3.14"
  18.    $trunc(5 3.54)                        returns "3.54000"
  19.  
  20. See Also:
  21.    set(4) floating_point_math
  22.  
  23.